import Vue from 'vue'
import Router from 'vue-router'

import Layout from './views/Layout'
import Home from './views/Home'
import Rsume from '@/views/Rsume'
import Dynamic from '@/views/Dynamic'
import Photo from '@/views/Photo'
import ArticleList from '@/views/ArticleList'
import Article from '@/views/Article'
import Speak from '@/views/Speak'
import User from '@/views/User'
Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '',
      component: Layout,
      children:[
        {
          path: '/',
          name: 'home',
          component: Home,
          meta: {
            title: "天小天个人网-首页",
          },
        },
        {
          path: '/rsume',
          name: 'Rsume',
          component: Rsume,
          meta: {
            title: '天小天个人网-简历'
          },
        },
        {
          path: '/dynamic',
          name: 'Dynamic',
          component: Dynamic,
          meta: {
            title: '天小天个人网-动态'
          },
        },
        {
          path: '/photo',
          name: 'Photo',
          component: Photo,
          meta: {
            title: '天小天个人网-照片'
          },
        },
        {
          path: '/articlelist',
          name: 'ArticleList',
          component: ArticleList,
          meta: {
            title: '天小天个人网-文章'
          },
        },
        {
          path: '/speak',
          name: 'Speak',
          component: Speak,
          meta: {
            title: '天小天个人网-留言'
          },
        },
        {
          path: '/user',
          name: 'User',
          component: User,
          meta: {
            title: '天小天个人网-我的'
          },
        }
      ]
    },
    {
      path: '/article/:article_id',
      name: 'Article',
      component: Article,
      meta: {
        title: '天小天个人网-文章'
      },
    },
  ]
})
